package com.spring.aop;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.spring.proxy.UserServiceProxyFactory;
import com.spring.proxy.UserServiceProxyFactory2;
import com.spring.service.UserService;
import com.spring.service.UserServiceImpl;

public class Test {
	
	private static final Class UserService = null;

	public static void main(String[] args) {
//		UserService us = new UserServiceImpl();
//		UserServiceProxyFactory uspf = new UserServiceProxyFactory(us);
//		UserService us2 = uspf.getUserServiceProxy();
//		us2.save();
		
//		UserServiceProxyFactory2 us3 = new UserServiceProxyFactory2();
//		UserService us4 = us3.getUserServiceProxy();
//		us4.delete();
		ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
	
		UserService us = (UserService)ac.getBean("testServiceImpl");
		us.delete();
	}
}
